/* 基础页面样式 - 定义全局页面容器
Base page styles - Global page container */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #333;
}


/* 主题切换机制 - 通过CSS变量实现主题状态保存
Theme switching - Using CSS variables for theme persistence */
.light-theme {
    background-color: #f0f0f0;
}

.light-theme 
/* Flex布局实现 - 主轴空间分布与垂直居中
Flex layout - Main axis spacing & vertical alignment */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.light-theme .nav-link,
.light-theme .logo,
.light-theme .moon-icon,
.light-theme .sun-icon {
    color: #111 !important;
}
/* 红色的X */
.red-x::after {
    content: '✕';
    color: rgba(255, 0, 0, 0.5);
    margin-left: 5px;
    font-size: 1em;
    position: absolute;
    pointer-events: none;
}


/* Flex布局实现 - 主轴空间分布与垂直居中
Flex layout - Main axis spacing & vertical alignment */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color:  #f0f0f0;
    margin: 0;
    padding: 10px 30px;
    width: 100vw;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    box-sizing: border-box;
    z-index: 1000;
}

.logo {
    font-size: 19px;
    color: rgb(187, 182, 182);
}


/* 导航链接容器 | Nav links container */
.nav-links {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
    /* width: 70%; */
}


/* 导航链接样式 | Nav link styles */
.nav-link {
    color: rgb(187, 182, 182);
    text-decoration: none;
    padding: 0 10px;
}


/* 下拉菜单定位原理 - 绝对定位与层级控制
Dropdown positioning - Absolute positioning & z-index */
.dropdown {
    position: relative;
}

/* 下拉菜单箭头样式 */
.nav-link.dropdown-toggle {
    position: relative;
    padding-right: 15px !important;
}

/* 伪元素箭头实现 - SVG图标与旋转动画
Pseudo-element arrow - SVG icon & rotation transition */
.nav-link.dropdown-toggle::after {
    content: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='%23bbb6b6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    position: absolute;
    right: 3px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.light-theme /* 伪元素箭头实现 - SVG图标与旋转动画
Pseudo-element arrow - SVG icon & rotation transition */
.nav-link.dropdown-toggle::after {
    filter: none;
    fill: var(--dropdown-text);
}

.dropdown:hover /* 伪元素箭头实现 - SVG图标与旋转动画
Pseudo-element arrow - SVG icon & rotation transition */
.nav-link.dropdown-toggle::after {
    transform: rotate(-90deg);
}

:root {
    --dropdown-bg: #333;
    --dropdown-text: #f0f0f0;
}

.light-theme {
    --dropdown-bg: #ffffff;
    --dropdown-text: #111;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-bg);
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    width: 100px;
    padding: 1px 0;
    z-index: 1001;
    color: var(--dropdown-text);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--dropdown-text);
    padding: 10px 20px;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background: #f8f9fa;
}

.dropdown-toggle {
    cursor: pointer;
}



.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--dropdown-text);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
}

.moon-icon,
.sun-icon {
    color: var(--dropdown-text);
    margin-right: 10px;
}

.dropdown-content a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown:hover.dropdown-content {
    display: block;
}

.search-bar {
    display: flex;
    align-items: center;
}


/* 搜索框交互设计 - 聚焦状态与过渡动画
Search box interaction - Focus state & transitions */
.search-bar input {
    padding: 5px;
    border: 1px solid #444;
    border-radius: 3px;
    width: 125px;
    background-color: #333 !important;
    color: white !important;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    background-color: #444 !important;
    box-shadow: 0 0 3px rgba(255,255,255,0.3);
}

.search-bar input::placeholder {
    color: #ccc;
}

.moon-icon {
    margin-right: 10px;
    color: white;
}

.search-icon {
    margin-left: 5px;
}

.shortcut {
    margin-left: 10px;
    font-size: 12px;
}


/* 页面标题样式 */
img{
    /* width: 200px;
    height: auto; */
    /* 让图片逆时针旋转 45 度 */
    transform: rotate(-90deg);
    margin-bottom: -100px; 
        
}
.bd {
    padding: 15px 0;
    margin-top: -10px;
    text-align: center;
}